package com.dyh.quickdemo.stub;

import lombok.Getter;
import lombok.Setter;
import org.slf4j.helpers.FormattingTuple;

import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/*
@Author=Joey Wheeler
@Date=2021/4/14 16:04
*/
@Setter@Getter
public class Stub {
    private String targetId;//orderId
    private Set<String> tags;//lvmh,presale ...
    private StringBuilder report;//error ,bizException

    public Stub(long targetId) {
        this(targetId+"");
    }
    public Stub(String targetId) {
        this.targetId = targetId;
        this.tags = new HashSet<>();
        this.report = new StringBuilder();
    }
    public void log(String msg){
        report.append(msg).append("  ");
    }

    public void log(String msgPattern,Object args){
        report.append(StubLogger.log(msgPattern,args)).append("  ");
    }

    public void addTag(String tag){
        this.tags.add(tag);
    }


}
